home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.5 KB | 123 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: SLWinDIB.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef SLWINDIB_H
- #define SLWINDIB_H
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifdef FW_BUILD_WIN
-
- #ifndef SLCOLOR_H
- #include "SLColor.h"
- #endif
-
- #ifndef SLSTRMRW_H
- #include "SLStrmRW.h"
- #endif
-
- //========================================================================================
- // DIB utilities
- //========================================================================================
-
- FW_EXTERN_C_BEGIN
-
- // ----- Attributes
-
- FW_WinPixelBufferPtr
- SL_API FW_DIBGetPixelBuffer(FW_WinDIB dib);
-
- unsigned short
- SL_API FW_PrivDIBAcquireColorTable(FW_WinDIB dib, FW_SColor** colors);
-
- void
- SL_API FW_DIBReleaseColorTable(FW_SColor* colors);
-
- // ----- Conversion
-
- HBITMAP
- SL_API FW_PrivDIBConvertToBitmap(FW_WinDIB dib, HPALETTE hPal);
-
- FW_WinDIB
- SL_API FW_PrivDIBConvertFromBitmap(HBITMAP bitmapHandle, short bitDepth, HPALETTE hPal);
-
- // ----- Palette
-
- unsigned long
- SL_API FW_DIBGetPaletteSize(FW_WinDIB dib);
-
- HPALETTE
- SL_API FW_PrivDIBGetPalette(Environment* ev, FW_WinDIB dib);
-
- // ----- Creation
-
- FW_WinDIB
- SL_API FW_PrivDIBCreate(
- short bitDepth, short width, short height,
- short nbColors, const FW_SColor* colorTable,
- const void* pixels);
-
- FW_WinDIB
- SL_API FW_PrivDIBCreateCopy(FW_WinDIB dib);
-
- // ----- Persistence
-
- FW_WinDIB
- SL_API FW_PrivDIBLoadFromStream(
- Environment* ev,
- FW_HReadableStream stream,
- FW_Boolean bFileHeader);
-
- void
- SL_API FW_PrivDIBSaveToStream(
- Environment* ev,
- FW_HWritableStream stream,
- FW_WinDIB dib,
- FW_Boolean bFileHeader);
-
- // ----- Memory
-
- void
- SL_API FW_DIBFree(FW_WinDIB dib);
-
- //========================================================================================
- // Device Dependent Bitmap utilities
- //========================================================================================
-
- // ----- Color info
-
- short
- SL_API FW_DDBGetColorDepth(HBITMAP hBitmap);
-
- // ----- Image copying options
-
- enum
- {
- FW_kCropImage,
- FW_kScaleImage
- };
-
- void
- SL_API FW_DDBCopyImage(
- HBITMAP hBmpDst,
- HPALETTE hPalDst,
- const RECT* rectDst,
- HBITMAP hBmpSrc,
- HPALETTE hPalSrc,
- const RECT* rectSrc,
- short options);
-
- FW_EXTERN_C_END
-
- #endif // FW_BUILD_WIN
-
- #endif // SLWINDIB_H
-